package com.evan.produce;

/**
 * @author huangzhongliang
 * @time 2023/06/06 20:04
 */
public class SaleTicketThread {

    public static void main(String[] args) {
        TicketThread ticketThread = new TicketThread();
        //创建三个线程
        new Thread(() -> {
            for (int i = 0; i < 40; i++) {
                ticketThread.saleTicket();
            }
        }, "AA").start();

        new Thread(() -> {
            for (int i = 0; i < 40; i++) {
                ticketThread.saleTicket();
            }
        }, "BB").start();

        new Thread(() -> {
            for (int i = 0; i < 40; i++) {
                ticketThread.saleTicket();
            }
        }, "CC").start();

    }
}
